1. Technical Field
The present invention relates to a host computer, and relates more particularly to a control method of a host computer for appropriately executing real-time commands without causing an operating error even when print data is compressed for transmission to a printer.
2. Related Art
Instructions (commands) sent to a printer include commands (referred to below as normal commands) such as print commands that are processed in the order transmitted (in the order received by the printer), and commands (referred to below as real-time commands) that are executed with priority over normal commands immediately upon receipt by the printer.
Real-time commands include commands to return information indicating the status of the printer (status information), commands to clear data stored in data buffers of the printer, and commands to operate (drive) devices connected to a printer, such as to open a drawer or sound an alarm.
Binary data such as image data may be contained (added to) in some commands that are sent to a printer, such as print commands for printing images and graphics, and the data train in such commands may contain a data train identical to the data train of a real-time command. In this event, the printer that receives the data train may erroneously interpret image data to be printed as a real-time command, and an unintended real-time command may be executed. Unintended operations caused by such false real-time commands may result in essential data being cleared, for example, and must be avoided.
To avoid problems, the device described in JP-A-2000-298563 uses the equivalent of a prohibit real-time command to prevent the printer from executing real-time commands.
Operating environments in which printers are used by mobile terminals that send print commands to the printer by wireless communication are increasingly common. To improve the printing performance of the printer and assure print quality at a constant print speed in such environments, the host device compresses the data to be transmitted in order to shorten the data transmission time to the printer.
As described above, the compressed data may also contain data trains identical to a real-time command, and when a data train identical to a real-time command is detected in the compressed data, the original data is sent to the printer without being compressed.
However, if the original, uncompressed data is transmitted in an environment in which the data is preferably compressed for transmission as described above, operating errors caused by false real-time commands resulting from compression can be avoided, but printers that print continuously may need to reduce the print speed due to communication delays, and printing problems, such as the introduction of white bands (blank bands) to images printed by changing the print speed may result.
When the method described in JP-A-2000-298563 is used, operating errors caused by false real-time commands can be prevented in the printer even if compressed data containing a data train identical to a real-time command is sent, but executing a true (valid) real-time command while sending compressed data may also be necessary. However, because the printer is prohibited from executing real-time commands, even valid real-time commands that are sent are ignored and not executed.